    <div class="container top">   
      
          <?php
              foreach($test_exam_data as $row)
              {
                 echo '<div class="tablestudentnamefont"><span>Student Name&nbsp;&nbsp;:&nbsp;</span><span>'.$row['student_name'].'</span></div><br/><br/>';
                 echo '<input type="hidden" id="academic_session" name="academic_session" value="'.$row['academic_session'].'">';
                 echo '<input type="hidden" id="real_student_id" name="real_student_id" value="'.$row['student_id'].'">';
                break;
              }
           ?>
           <input type="hidden" id="exam_id" name="exam_id" value="first_term">
           <div style="text-align: center" align="center">
            <table style="text-align: center;width: 100%" align="center" class="globaltable globaltable-striped globaltable-bordered globaltable-condensed">
             <?php
                    echo '<tr>';
                    echo '<th>Subject Name</th>';
                    echo '<th>Attendence</th>';
                    echo '<th>Paper I- MCQ</th>';
                    echo '<th>Paper I- CQ</th>';
                    echo '<th>Paper I- Total</th>';
                    echo '<th>Paper II-MCQ</th>';
                    echo '<th>Paper II-CQ</th>';
                    echo '<th>Paper II- Total</th>';
                    echo '<th>Grand Toral</th>';
                    echo '<th>GPA</th>';
                    echo '</tr>';
                    $i=0;
                  foreach($test_exam_data as $row)
                  {
                  	$i=$i+1;
                    echo '<tr>';
                    echo '<td style="text-align: center" > '.$row["subject_name"].'<input type="hidden"  name="subject_id[]" value="'.$row["subject_id"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center" onkeyup="sum_of_marks_s_y_test_e('.$i.')" id="s_y_test_att'.$i.'"  name="s_y_test_att[]" value="'.$row["s_y_test_att"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center" onkeyup="sum_of_marks_s_y_test_e('.$i.')" id="s_y_t_p1_mcq'.$i.'"  name="s_y_t_p1_mcq[]" value="'.$row["s_y_t_p1_mcq"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center" onkeyup="sum_of_marks_s_y_test_e('.$i.')" id="s_y_t_p1_cq'.$i.'"  name="s_y_t_p1_cq[]" value="'.$row["s_y_t_p1_cq"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center"  id="s_y_t_p1_total'.$i.'"  name="s_y_t_p1_total[]" value="'.$row["s_y_t_p1_total"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center" onkeyup="sum_of_marks_s_y_test_e('.$i.')" id="s_y_t_p2_mcq'.$i.'"  name="s_y_t_p2_mcq[]" value="'.$row["s_y_t_p2_mcq"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center" onkeyup="sum_of_marks_s_y_test_e('.$i.')" id="s_y_t_p2_cq'.$i.'"  name="s_y_t_p2_cq[]" value="'.$row["s_y_t_p2_cq"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center"  id="s_y_t_p2_total'.$i.'"  name="s_y_t_p2_total[]" value="'.$row["s_y_t_p2_total"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center"  id="s_y_test_gra_total'.$i.'"  name="s_y_test_gra_total[]" value="'.$row["s_y_test_gra_total"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center"  id="s_y_test_gpa'.$i.'"   name="s_y_test_gpa[]" value="'.$row["s_y_test_gpa"].'"></td>';
                    echo '</tr>';
                  }
                ?>   
             </table>
           </div>
           <div class="form-actions">
            <input type="submit"  value="Save changes" class="btn btn-primary"  size="10" />
          </div>
      

    </div>
     